package cn.iocoder.yudao.module.train.controller.admin.staff.vo;

import cn.iocoder.yudao.framework.excel.core.annotations.DictFormat;
import cn.iocoder.yudao.framework.excel.core.convert.DictConvert;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.*;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
import cn.iocoder.yudao.framework.common.pojo.PageParam;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;

import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

@Schema(description = "管理后台 - 工作人员用户分页 Request VO")
@Data
public class StaffPageReqVO extends PageParam {

    @Schema(description = "工作人员姓名", example = "李四")
    private String staffName;

    @Schema(description = "微信用户关联", example = "30521")
    private Long userId;

    @Schema(description = "年龄")
    private Integer staffAge;

    @Schema(description = "工作人员性别（0男 1女 2未知）")
    private Integer staffSex;

    @Schema(description = "人员类型", example = "1")
    private Integer staffType;

    @Schema(description = "创建时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] createTime;

    @Schema(description = "出生日期")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] staffBirthdate;

    @Schema(description = "手机号码")
    @JsonProperty("staffPhoneNumber")
    private String staffPhoneNumber;

    @Schema(description = "openId")
    @JsonProperty("uOpenId")
    private String uOpenId;

    @Schema(description = "头像地址")
    @JsonProperty("uAvatar")
    private String uAvatar;

    @Schema(description = "用户名")
    @JsonProperty("uName")
    private String uName;

    @Schema(description = "帐号状态（0正常 1停用）", example = "1")
    @ExcelProperty(value = "帐号状态（0正常 1停用）", converter = DictConvert.class)
    @DictFormat("train_account_status") // TODO 代码优化：建议设置到对应的 DictTypeConstants 枚举类中
    @JsonProperty("uStatus")
    private Integer uStatus;
}
